package com.amigo.online.amigo.online.provider.mimc.config

import com.alibaba.fastjson.JSONObject
import com.google.gson.Gson
import okhttp3.RequestBody

fun JSONObject.body(): RequestBody {
    return RequestBody.create(Constants.JSON, this.toJSONString())
}

inline fun <reified T> String.POJO(): T {
    return Gson().fromJson<T>(this, T::class.java)
}